<?php

define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');

/* 拼接基地址 */
$baseUrl = $_SERVER['HTTP_HOST'] . '/app/indexPic/';
                                                                                     /* 先死后活 */
//轮显

$bannerPic = array(
	array('flag'=>1, 'title'=>'商品名称', 'pic'=>$baseUrl . 'index_banner_1.jpg', 'id'=>304 ,'link'=>''),
    array('flag'=>2, 'title'=>'活动名称', 'pic'=>$baseUrl . 'index_banner_2.jpg', 'id'=>''  ,'link'=>$_SERVER['HTTP_HOST']),
    array('flag'=>3, 'title'=>'宣传主题', 'pic'=>$baseUrl . 'index_banner_3.jpg', 'id'=>''  ,'link'=>$_SERVER['HTTP_HOST'])
    );
//功能列表
$listPic = array(
	array('flag'=>1,  'title'=>'最组合',   'pic'=>$baseUrl . 'index_banner_1.jpg'),
	array('flag'=>2,  'title'=>'限时特购', 'pic'=>$baseUrl . 'index_banner_2.jpg'),
	array('flag'=>3,  'title'=>'画种导购', 'pic'=>$baseUrl . 'index_banner_3.jpg')
	);

$bannerPic = tourlencode($bannerPic);
$listPic = tourlencode($listPic);
$response = array('response'=>'index', 'bannerPic'=>$bannerPic, 'listPic'=>$listPic);
echo  tourldecode( $response ) ;    



/* 获得请求header,即客户端相应信息    判断请求来源*/
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$header='';
foreach(getallheaders() as $key => $value){$header.= $key . '->' .$value . ' ';}
file_put_contents('output.log', $header);
/* 给测试 */
//var_dump($header);



